<?php

// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 
// +----------------------------------------------------------------------

namespace Admin\Controller;

use User\Api\UserApi as UserApi;

class IndexController extends AdminController
{

    public function index()
    {
        $weekarray = array("日", "一", "二", "三", "四", "五", "六");
        //获取近3天的课程表
        $starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
        $endtime = $starttime + 86400 * 3;

        $map['class_time'] = array(array('gt', $starttime), array('lt', $endtime), 'and');
        $list = M("Class_plan")->where($map)->order("class_time asc")->select();


        $this->assign('_list', $list);
        $this->assign("_title", "今天是：" . date("Y年m月d日") . '&nbsp;&nbsp;&nbsp;&nbsp;星期' . $weekarray[date("w")]);
        $this->meta_title = '管理首页';
        $this->display();
    }

}
